package com.jxb.demo.es.entity;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Document(indexName = "order",shards = 2)
public class OrderEntity {

    @Id
    private Long id;//主键

    @Field(name = "orderId",type = FieldType.Keyword,store = true)
    private String orderId;//订单号

    @Field(name = "orderAddr",type = FieldType.Text,analyzer = "ik_max_word",store = true)
    private String orderAddr;//订单地址

    @Field(name="orderDate",type = FieldType.Keyword,store = true)
    private String orderDate;//下单日期

    @Field(name="remark",store = true,type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_smart")
    private String remark;

    @Field(name="orderPrice",store = true,type = FieldType.Double)
    private double orderPrice;//订单价格

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getOrderAddr() {
        return orderAddr;
    }

    public void setOrderAddr(String orderAddr) {
        this.orderAddr = orderAddr;
    }

    public String getOrderDate() {
        return orderDate;
    }

    public void setOrderDate(String orderDate) {
        this.orderDate = orderDate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public double getOrderPrice() {
        return orderPrice;
    }

    public void setOrderPrice(double orderPrice) {
        this.orderPrice = orderPrice;
    }

}
